let dgram = require('dgram')
let socket = dgram.createSocket('udp4')
// 发消息 
// 收消息 在本机41234端口监听消息
socket.bind(41234, 'localhost');

socket.on('message', function(msg, rinfo){
    // socket.setBroadcast(true)
    console.log(msg.toString())
    socket.send(Buffer.from(msg),0,msg.length,rinfo.port, rinfo.address);
})


